<template>
	<view>
		<uni-section title="自定义样式" subTitle="使用 bgColor 属性自定义背景色" type="line">
			<uni-search-bar placeholder="公告标题" bgColor="#EEEEEE" @confirm="search" />
		</uni-section>

		<view @click="toPageThree">
			<uni-section type="line" v-for="val,index in noticeList" :key="index">
				<uni-card :title="val.title" :extra="val.time">
					<text class="uni-body">{{val.details}}</text>
				</uni-card>
			</uni-section>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				noticeList: [{
					title: "公告标题",
					time: "2024/6/12",
					details: "公告详情"
				}, {
					title: "公告标题",
					time: "2024/6/12",
					details: "公告详情"
				}, {
					title: "公告标题",
					time: "2024/6/12",
					details: "公告详情"
				}, {
					title: "公告标题",
					time: "2024/6/12",
					details: "公告详情"
				}, {
					title: "公告标题",
					time: "2024/6/12",
					details: "公告详情"
				}, {
					title: "公告标题",
					time: "2024/6/12",
					details: "公告详情"
				}, {
					title: "公告标题",
					time: "2024/6/12",
					details: "公告详情"
				}]
			}
		},
		methods: {
			toPageThree() {
				uni.navigateTo({
					url: '/pagesThree/NoticePageThree/NoticePageThree'
				});
			}
		}
	}
</script>

<style>

</style>